//
//  VerifyPswViewController.m
//  TenMinDemo
//
//  Created by Shawn Li on 2021/3/9.
//  Copyright © 2021 CYXiang. All rights reserved.
//

#import "VerifyPswViewController.h"
#import "OperateResultViewController.h"
#import "BaseTextField.h"

@interface VerifyPswViewController ()
@property (weak, nonatomic) IBOutlet BaseTextField *pswInput;

@end

@implementation VerifyPswViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)setupUI{
    [super setupUI];
    self.title = LCLocalString(@"psw_yzmm");
    self.pswInput.placeholderColor = PlhColor;
    self.pswInput.placeholder = LCLocalString(@"plh_qsrmm"); 
}
- (IBAction)doneAction:(id)sender {
    if(![self checkInput]) return;
    OperateResultViewController *vc = LoadVCFormXib(OperateResultViewController);
    [self.navigationController pushViewController:vc animated:YES];
}

- (BOOL)checkInput{
    if (!self.pswInput.text.length) {
//        [self showErrorMsg:@"请输入正确的手机号"];
        LCInfoHUD(LCLocalString(@"ts_sjhbnwk"),1);
        return NO;
    }
    if (self.pswInput.text.length < 8 || self.pswInput.text.length > 20) {
//        [self showErrorMsg:@"请输入正确的手机号"];
        LCInfoHUD(LCLocalString(@"mmcwts"),1);
        return NO;
    }
    return YES;
}




@end
